﻿#region License
/* Copyright (C) 2009 Tim Coulter
 * 
 * This file is part of ExtremeML.
 * 
 * ExtremeML is free software: you can redistribute
 * it and/or modify it under the terms of the GNU General Public
 * License, as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
*/
#endregion

using System.Xml.Linq;

namespace ExtremeML.Sdk.Vml
{
	/// <summary>
	/// Implements a Vml shape for use with worksheet comments.
	/// </summary>
	internal class CommentShapeType : ShapeType
	{
		internal const string ShapeTypeId = "AquisioCommentShapeType";

		/// <summary>
		/// Initializes a new instance of the <see cref="CommentShapeType"/> class.
		/// </summary>
		public CommentShapeType()
			: base(GetDefaultElementContent())
		{
		}

		/// <summary>
		/// Returns an <see cref="XElement"/> containing the default content for this class.
		/// </summary>
		private static XElement GetDefaultElementContent()
		{
			return new XElement(Utility.V + "shapetype",
				new XAttribute("id", ShapeTypeId),
				//new XAttribute("coordsize", "21600,21600"),
				new XAttribute("coordsize", "43200,43200"),
				new XAttribute(Utility.O + "spt", "202"),
				//new XAttribute("path", "m,l,21600r21600,l21600,xe"),
				new XAttribute("path", "m,l,43200r43200,l43200,xe"),
				new XElement(Utility.V + "stroke",
					new XAttribute("joinstyle", "miter")),
				new XElement(Utility.V + "path",
					new XAttribute("gradientshapeok", "t"),
					new XAttribute(Utility.O + "connecttype", "rect")));
		}
	}
}